<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="follow, index" />
<meta name="author" content="iune co." />
<meta name="description"
	content="IUNE有最好的库存管理SaaS软件。以更快更高的准确度，跟进实时数据的访问和库存移动。" />
<meta name="keywords"
	content="库存, 存货管理, 库存管理, 仓库管理, 云ERP, 云逸ERP, 中小型企业云ERP, SaaS ERP软件/系统" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>

<style type="text/css">
</style>

</head>
<body>


	<div class="container-fluid" data-ng-controller="fileCustomerSingleCtrl as Model">
		<div class="row">
			<div class="col-sm-12">




				<!-- Nav tabs -->
<!-- 				
  <ul class="nav nav-tabs nav-justified" role="tablist">
    <li role="presentation" class="active"><a href="#customer_customerInfo_single_tab_list" role="tab" data-toggle="tab">列表</a></li>
    <li role="presentation"><a href="#customer_customerInfo_single_tab_single" role="tab" data-toggle="tab">详细</a></li>
  </ul>
 -->  

				<!-- Tab panes -->
				<div class="tab-content">
					<!--  列表页面 -->
					<div role="tabpanel"
						data-ng-class="{true:'tab-pane active',false:'tab-pane'}[tabpanel=='list']"
						id="customer_customerInfo_single_tab_list">

						<!-- 列表按钮菜单 -->
						<div class="row">
							<div class="col-sm-12">

								<nav class="nav">
									<ul class="pagination navbar-left buttonBar">
										<li>
											<button class="btn btn-success"
												data-ng-click="tabpanel='single';">
												<span class="glyphicon glyphicon-file"></span> 详细
											</button>
										</li>
										<li>
											<div class="btn-group" role="toolbar">
												<shiro:hasPermission name="/customer/customerInfo/single:create">
													<button type="button" class="btn btn-info "
														data-ng-click="Model.add()">
														<span class="glyphicon glyphicon-plus"></span> 新建
													</button>
												</shiro:hasPermission>

												<shiro:hasPermission name="/customer/customerInfo/single:save">
													<button type="button" class="btn btn-default"
														data-ng-disabled="Model.dataMaster.currentIndex==null || Model.dataMaster.getCurrentState()"
														data-ng-click="Model.edit()">
														<span class="glyphicon glyphicon-edit"></span> 修改
													</button>
												</shiro:hasPermission>
												<shiro:hasPermission name="/customer/customerInfo/single:delete">
													<button type="button" class="btn btn-default"
														data-ng-disabled="Model.dataMaster.currentIndex==null || Model.dataMaster.getCurrentState()"
														data-ng-click="Model.remove()">
														<span class="glyphicon glyphicon-trash"></span> 删除
													</button>
												</shiro:hasPermission>
												<shiro:hasPermission name="/customer/customerInfo/single:query">
													<button type="button" class="btn btn-default" ng-if="false"
														data-ng-click="Model.refresh()">
														<span class="glyphicon glyphicon-refresh"></span> 刷新
													</button>
												</shiro:hasPermission>
											</div>
										</li>
									</ul>

									<shiro:hasPermission name="/customer/customerInfo/single:query">
										<query-like data="Model.dataMaster" place-holder="模糊查询..."></query-like>
									</shiro:hasPermission>

	<form class="navbar-form navbar-left buttonBar" style="padding-right:0px;">
         <div class="form-group">
 			<label class="control-label">单据日期:</label>
          	<range-filter  placeholder="请输入日期" filter-data="Model.dataMaster" filter-relation="orderDate" xid="rangeilter1" auto-refresh="false"></range-filter>
         </div>
		<shiro:hasPermission name="/customer/customerInfo/single:query">
		<!-- Split button -->
		<div class="btn-group">
			<button type="button" class="btn btn-default" data-ng-click="Model.refresh()">
				<span class="glyphicon glyphicon-refresh"></span> 刷新
			</button>
		  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
		    <span class="caret"></span>
		    <span class="sr-only">Toggle Dropdown</span>
		  </button>
		  <ul class="dropdown-menu" role="menu">
		    <li><a data-toggle="collapse" href="#_customer_customerInfo_single"> 更多过滤条件</a></li>
		  </ul>
		</div>
		</shiro:hasPermission>
    </form>		

								</nav>
<div class="collapse" id="_customer_customerInfo_single">
  <div class="well" style="padding-left:0px;padding-right:0px;">
	<nav class="nav">
		<form class="navbar-form navbar-left buttonBar" style="padding-left:0px;padding-right:0px;">
         <div class="form-group">
 			<label class="control-label">客户编码:</label>
          	<grid-filter  placeholder="请输入编码" filter-data="Model.dataMaster" filter-relation="customerNo" xid="gridFilter1" auto-refresh="false"></grid-filter>
         </div>
         <div class="form-group">
 			<label class="control-label">客户简称:</label>
          	<grid-filter  placeholder="请输入简称" filter-data="Model.dataMaster" filter-relation="shortName" xid="gridFilter2" auto-refresh="false"></grid-filter>
         </div>
         <div class="form-group">
 			<label class="control-label">客户名称:</label>
          	<grid-filter  placeholder="请输入名称" filter-data="Model.dataMaster" filter-relation="customerName" xid="gridFilter3" auto-refresh="false"></grid-filter>
         </div>
         <div class="form-group">
 			<label class="control-label">信用代码:</label>
          	<grid-filter  placeholder="请输入信用代码" filter-data="Model.dataMaster" filter-relation="sIDCard" xid="gridFilter4" auto-refresh="false"></grid-filter>
         </div>
         <div class="form-group">
 			<label class="control-label">办公电话:</label>
          	<grid-filter  placeholder="请输入办公电话" filter-data="Model.dataMaster" filter-relation="sPhone" xid="gridFilter5" auto-refresh="false"></grid-filter>
         </div>
		<button type="button" class="btn btn-default" data-ng-click="Model.refresh()" data-toggle="collapse" data-target="#_customer_customerInfo_single">
			<span class="glyphicon glyphicon-refresh"></span> 刷新
		</button>
		</form>
	</nav>
  </div>
</div>				

							</div>
						</div>
						
						
						<!-- 列表 -->
						<div class="row">
							<div class="col-sm-12">

							<div class="table-responsive">
								<table class="table table-hover table-condensed" style="margin:0px;">
									<thead>
								<tr>
									<th colspan="99"  style="padding:0px;">
									</th>
								</tr>

										<tr>
											<th></th>
											<th>#</th>
											<th hidden="hidden">状态</th>
											<th hidden="hidden">fID</th>
											<th>状态</th>
											<th hidden="hidden">子系统</th>
											<th hidden="hidden">单据类型</th>
											<th hidden="hidden">单据类型</th>
											<th>编码</th>
											<th>日期</th>
											<th>简称</th>
											<th>客户名称</th>
											<th>类型</th>
											<th hidden="hidden">操作状态</th>
											<th>备注</th>
											<th hidden="hidden">创建者编码</th>
											<th hidden="hidden">创建者</th>
											<th hidden="hidden">创建时间</th>
											<th hidden="hidden">创建者id</th>
											<th hidden="hidden">公司id</th>
											<th hidden="hidden">公司</th>
											<th></th>
										</tr>
									</thead>
									<tbody>
										<tr data-ng-show="row.userdata.recordState!='delete'"
											data-ng-class="{true:'active'}[Model.dataMaster.currentIndex==Model.dataMaster.rows.indexOf(row)]"
											data-ng-click="Model.dataMaster.onRowClick(row,$event)"
											data-ng-dblclick="Model.gridListRowDblclick(Model.dataMaster.rows.indexOf(row),$event)"
											data-ng-repeat="row in Model.dataMaster.rows">
											<td style="width: 10px;"><span
												data-ng-show="Model.dataMaster.currentIndex==Model.dataMaster.rows.indexOf(row)"
												class="glyphicon glyphicon-hand-right" aria-hidden="true"></span></td>
											<td style="width: 10px;">{{Model.dataMaster.rows.indexOf(row)+1}}</td>
											<td style="width: 10px;" hidden="hidden"
												data-ng-bind="row.userdata.recordState"></td>
											<td style="width: 200px;" hidden="hidden">{{row.fid.value}}</td>
											<td style="width: 50px;"><span
												data-ng-show="row.status.value=='open'"
												class="glyphicon glyphicon-ok" aria-hidden="true"></span></td>
											<td style="width: 100px;" hidden="hidden">{{row.systemCode.value}}</td>
											<td style="width: 100px;" hidden="hidden">{{row.billType.value}}</td>
											<td style="width: 100px;" hidden="hidden">{{row.billTypeName.value}}</td>
											<td style="width: 100px;">{{row.customerNo.value}}</td>
											<td style="width: 100px;">{{row.orderDate.value}}</td>
											<td style="width: 100px;">{{row.shortName.value}}</td>
											<td style="width: 300px;">{{row.customerName.value}}</td>
											<td style="width: 100px;">{{row.billTypeName.value}}</td>
											<td style="width: 100px;" hidden="true">{{row.state.value}}</td>
											<td style="width: 200px;">{{row.comments.value}}</td>
											<td style="width: 100px;" hidden="hidden">{{row.cUsercode.value}}</td>
											<td style="width: 100px;" hidden="hidden">{{row.cUsername.value}}</td>
											<td style="width: 200px;" hidden="hidden">{{row.cDatetime.value}}</td>
											<td style="width: 100px;" hidden="hidden">{{row.userId.value}}</td>
											<td style="width: 100px;" hidden="hidden">{{row.enterpriseNo.value}}</td>
											<td style="width: 200px;" hidden="hidden">{{row.enterpriseName.value}}</td>

											<td></td>
										</tr>

									</tbody>

									<tfoot>
								<tr>
									<th colspan="99"  style="padding:0px;">
									</th>
								</tr>
									</tfoot>

								</table>
								</div>
								
							</div>
						</div>
						
						<!-- 分页组件 -->
						<div class="row">
							<div class="col-sm-12">
							
									<pag-ination data="Model.dataMaster" first-text="首页" previous-text="上一页" next-text="下一页" last-text="末页"></pag-ination>

							</div>
						</div>


					</div>
					<!--  列表页面 -->



					<!-- 详细页面 -->
					<div role="tabpanel"
						data-ng-class="{true:'tab-pane active',false:'tab-pane'}[tabpanel=='single']"
						id="customer_customerInfo_single_tab_single">


						<!-- 主表按钮菜单 -->
						<div class="row">
							<div class="col-sm-12">
								<nav class="nav">
									<ul class="pagination navbar-left buttonBar">
										<li>
											<button class="btn btn-success"
												data-ng-disabled="!Model.dataMaster.readonly()"
												data-ng-click="tabpanel='list';">
												<span class="glyphicon glyphicon-list"></span> 列表
											</button>
										</li>
										<li>
											<div class="btn-group" role="toolbar">
												<shiro:hasPermission name="/customer/customerInfo/single:create">
													<button type="button" class="btn btn-info "
														data-ng-disabled="!Model.dataMaster.readonly()"
														data-ng-click="Model.add();">
														<span class="glyphicon glyphicon-plus"></span> 新建
													</button>
												</shiro:hasPermission>
												<shiro:hasPermission name="/customer/customerInfo/single:save">
													<button type="button" class="btn btn-default"
														data-ng-disabled="Model.dataMaster.currentIndex==null || Model.dataMaster.getCurrentState()"
														data-ng-show="Model.dataMaster.readonly()"
														data-ng-click="Model.edit();">
														<span class="glyphicon glyphicon-edit"></span> 修改
													</button>
												</shiro:hasPermission>

												<button type="button" class="btn btn-success "
													data-ng-show="!Model.dataMaster.readonly()"
													data-ng-click="Model.save();">
													<span class="glyphicon glyphicon-floppy-save"></span> 保存
												</button>
												<button type="button" class="btn btn-warning "
													data-ng-show="!Model.dataMaster.readonly()"
													data-ng-click="Model.saveCancel();">
													<span class="glyphicon glyphicon-floppy-open"></span> 取消
												</button>
												<shiro:hasPermission name="/customer/customerInfo/single:delete">
													<button type="button" class="btn btn-default"
														data-ng-show="Model.dataMaster.readonly()"
														data-ng-disabled="Model.dataMaster.currentIndex==null || Model.dataMaster.getCurrentState()"
														data-ng-click="Model.remove()">
														<span class="glyphicon glyphicon-trash"></span> 删除
													</button>
												</shiro:hasPermission>
												<shiro:hasPermission name="/customer/customerInfo/single:query">
													<button type="button" class="btn btn-default"
														data-ng-disabled="!Model.dataMaster.readonly()"
														data-ng-click="Model.refresh()">
														<span class="glyphicon glyphicon-refresh"></span> 刷新
													</button>
												</shiro:hasPermission>
											</div>
										</li>
									</ul>


									<row-ination data="Model.dataMaster" first-text="第一条"
										previous-text="上一条" next-text="下一条" last-text="最后一条"
										first-show="false" previous-show="true" next-show="true"
										last-show="false">
									</row-ination>


								</nav>
							</div>
						</div>
						<!-- 主表FORM -->
						<div class="row">
							<div class="col-sm-12">

								<uib-tabset> 
								<uib-tab heading="基本信息"> <br>

								<form class="form-horizontal"
									id="customer_customerInfo_single_form_base">

									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">客户编码</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].customerNo.value"
														placeHolder="为空则系统会自动编码"  name="customerNo" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">客户类型</label>
												<div class="col-sm-8">
													<input type="text" class="form-control" disabled="disabled"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].billTypeName.value"
														name="billTypeName"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">

											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">日期</label>
												<div class="col-sm-8">
												
														<input type="text" class="form-control" simple-datepicker
															orientation="bottom auto"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].orderDate.value"
															name="orderDate"
															data-ng-disabled="Model.dataMaster.readonly();" />
												</div>
											</div>

										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">启用</label>
												<div class="col-sm-8">
													<input type="checkbox" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].status.value"
														bootstrap-switch data-size="small"
														data-ng-true-value="'open'" data-ng-false-value="'close'" 
														can-input="Model.dataMaster.readonly();">

												</div>
											</div>

										</div>
									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">客户简称</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].shortName.value"
														name="shortName" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">信用代码</label>
												<div class="col-sm-8">
													<input type="text" class="form-control" placeHolder="身份证号或组织机构代码"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sIDCard.value"
														name="sIDCard" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>

										</div>
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">经办人</label>
												<div class="col-sm-10">
													<div class="input-group">
														<input type="text" class="form-control"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].employeeName.value"
															data-ng-readonly="true" /> 
															<span class="input-group-btn">
																<button class="btn btn-default btn-sm"
																	data-ng-disabled="Model.dataMaster.readonly();"
																	data-ng-click="Model.triggerOrgNoClick()">
																	<span class="glyphicon "
																		data-ng-class="{'glyphicon-th-list':(Model.dataMaster.rows[Model.dataMaster.currentIndex].employeeNo.value==null || Model.dataMaster.rows[Model.dataMaster.currentIndex].employeeNo.value==''),'glyphicon-remove':!(Model.dataMaster.rows[Model.dataMaster.currentIndex].employeeNo.value==null || Model.dataMaster.rows[Model.dataMaster.currentIndex].employeeNo.value=='')}"
																		aria-hidden="true"></span>
																</button>
															</span>
														</div>
												</div>
											</div>
										</div>

									</div>
									<div class="row">

										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">客户名称</label>
												<div class="col-sm-10">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].customerName.value"
														name="customerName" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">类型</label>
												<div class="col-sm-8">
													<select-with-label 
														select-data="[
								                        {value:'GRKH',label:'个人'}
								                        ,{value:'QYKH',label:'企业'}
								                        ]" 
														select-label="label"
														select-value="value"
														target-data="Model.dataMaster"
														target-label="memberTypeLabel"
														target-value="memberType"
														row-index="Model.dataMaster.getCurrentIndex()"
														vertical="dropup"
														horizon="right"
														value-show="false">
													</select-with-label>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">移动电话</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sMobilePhone.value"
														name="sMobilePhone" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">云ID</label>
												<div class="col-sm-10">
													<div class="input-group">
														<input type="text" class="form-control" placeHolder="通过公司名称进行查询"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].ognID.value" name="ognID" data-ng-disabled="Model.dataMaster.readonly()"/>
														<span class="input-group-btn">
															<button class="btn btn-default btn-sm" data-ng-click="Model.bingingOgnClick()" ng-if="Model.dataMaster.rows[Model.dataMaster.currentIndex].ognID.value==null" data-ng-disabled="Model.dataMaster.readonly();">
																<span>绑定</span>
															</button>
															<button class="btn btn-default btn-sm" data-ng-click="Model.unbingingOgnClick()" ng-if="Model.dataMaster.rows[Model.dataMaster.currentIndex].ognID.value!=null" data-ng-disabled="Model.dataMaster.readonly();">
																<span>解绑</span>
															</button>
														</span>
													</div>
												</div>
											</div>
										</div>
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">登录名</label>
												<div class="col-sm-10">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sLoginName.value"
														name="sLoginName" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">是否会员</label>
												<div class="col-sm-8">
													<input type="checkbox" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].isMember.value"
														data-ng-true-value=1 data-ng-false-value=0 
														ng-disabled="Model.dataMaster.readonly();">

												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">会员卡号</label>
												<div class="col-sm-8">
													<div class="input-group">
														<input type="text" class="form-control" placeHolder="点击右侧按钮自动生成"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].memberNo.value" name="memberNo" data-ng-disabled="Model.dataMaster.readonly()"/>
														<span class="input-group-btn">
															<button class="btn btn-default btn-sm" data-ng-click="" data-ng-disabled="Model.dataMaster.readonly();">
																<span>...</span>
															</button>
														</span>
													</div>
												</div>
											</div>
										
										</div>
									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">会员等级</label>
												<div class="col-sm-8">
													<div class="input-group">
														<input type="text" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].memberLevelLabel.value" disabled/> 
														<span class="input-group-btn">
															<button class="btn btn-default btn-sm" data-ng-disabled="Model.dataMaster.readonly();" data-ng-click="Model.triggerMemberLevelClick()">
																<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
															</button>
														</span>
													</div>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">充值余额</label>
												<div class="col-sm-8">
													<input type="number" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].memberAmount.value" data-ng-disabled="true"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">占用金额</label>
												<div class="col-sm-8">
													<input type="number" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].allocatedAmount.value" data-ng-disabled="true"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">会员积分</label>
												<div class="col-sm-8">
													<input type="number" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].memberPoints.value" data-ng-disabled="true"/>
												</div>
											</div>
										</div>
									</div>
										</form>
								</uib-tab> 
								<uib-tab heading="交易信息"> <br>

								<form class="form-horizontal"
									id="customer_customerInfo_single_form_invoice">

									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">发票类型</label>
												<div class="col-sm-8">
						<invoice-category 
							target-data="Model.dataMaster"
							target-label="invoiceCategoryLabel"
							target-value="invoiceCategory"
							row-index="Model.dataMaster.getCurrentIndex()"
							vertical="dropdown"
							horizon="right"
							value-show="false">
						</invoice-category>
												
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">税种</label>
												<div class="col-sm-8">
						<tax-type 
							target-data="Model.dataMaster"
							target-label="taxTypeLabel"
							target-value="taxType"
							row-index="Model.dataMaster.getCurrentIndex()"
							vertical="dropdown"
							horizon="right"
							value-show="false">
						</tax-type>
												</div>
											</div>
										</div>
										<div class="col-sm-3">

											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">税率</label>
												<div class="col-sm-8">
														<input type="number" class="form-control" 
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].taxRate.value"
															name="taxRate"
															data-ng-disabled="Model.dataMaster.readonly();" />
												</div>
											</div>

										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">结算方式</label>
												<div class="col-sm-8">
						<settle-category 
							target-data="Model.dataMaster"
							target-label="settleCategoryLabel"
							target-value="settleCategory"
							row-index="Model.dataMaster.getCurrentIndex()"
							vertical="dropdown"
							horizon="right"
							value-show="false">
						</settle-category>

												</div>
											</div>

										</div>
									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">税号</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].taxNo.value"
														name="taxNo" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">定金比率</label>
												<div class="col-sm-8">
													<input type="number" class="form-control" placeHolder="身份证号或组织机构代码"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].depositRate.value"
														name="depositRate" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>

										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">初次交易</label>
												<div class="col-sm-8">
														<input type="text" class="form-control" simple-datepicker
															orientation="bottom auto"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].dealDateFirst.value"
															name="dealDateFirst"
															data-ng-disabled="Model.dataMaster.readonly();" />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">最近交易</label>
												<div class="col-sm-8">
														<input type="text" class="form-control" simple-datepicker
															orientation="bottom auto"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].dealDateLast.value"
															name="dealDateLast"
															data-ng-disabled="Model.dataMaster.readonly();" />
												</div>
											</div>

										</div>

									</div>
									<div class="row">

										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">开户行</label>
												<div class="col-sm-10">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].accountBank.value"
														name="accountBank" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>

										</div>
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">银行账号</label>
												<div class="col-sm-10">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].accountNo.value"
														name="accountNo" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>

										</div>
									</div>
									
									
									<div class="page-header">
										<h4>会计科目 <small>业务单据生成会计分录时使用</small></h4>
									</div>
									
									<div class="row">
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">账款科目</label>
												<div class="col-sm-10">
													<div class="input-group">
														<input type="text" class="form-control" readonly data-ng-model="Model.dataMaster.rows[Model.dataMaster.getCurrentIndex()].captionName1.value" data-ng-readonly="true"/>
														<span class="input-group-btn">
											            	<button class="btn btn-default btn-sm" ng-disabled="Model.dataMaster.readonly()" ng-click="Model.triggerCaptionNoClick('captionNo1','captionName1')"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></button> 
											            </span> 
														<input type="text" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.getCurrentIndex()].captionNo1.value" readonly>
													</div><!-- /input-group -->
												</div>
											</div>
										</div>
										<div class="col-sm-6">

										</div>
									</div>
									<div class="row">
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">预收科目</label>
												<div class="col-sm-10">
													<div class="input-group">
														<input type="text" class="form-control" readonly data-ng-model="Model.dataMaster.rows[Model.dataMaster.getCurrentIndex()].captionName2.value" data-ng-readonly="true"/>
														<span class="input-group-btn">
											            	<button class="btn btn-default btn-sm" ng-disabled="Model.dataMaster.readonly()" ng-click="Model.triggerCaptionNoClick('captionNo2','captionName2')"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></button> 
											            </span> 
														<input type="text" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.getCurrentIndex()].captionNo2.value" readonly>
													</div><!-- /input-group -->
												</div>
											</div>
										</div>
										<div class="col-sm-6">

										</div>
									</div>
									<div class="row">
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">票据科目</label>
												<div class="col-sm-10">
													<div class="input-group">
														<input type="text" class="form-control" readonly data-ng-model="Model.dataMaster.rows[Model.dataMaster.getCurrentIndex()].captionName3.value" data-ng-readonly="true"/>
														<span class="input-group-btn">
											            	<button class="btn btn-default btn-sm" ng-disabled="Model.dataMaster.readonly()" ng-click="Model.triggerCaptionNoClick('captionNo3','captionName3')"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></button> 
											            </span> 
														<input type="text" class="form-control" data-ng-model="Model.dataMaster.rows[Model.dataMaster.getCurrentIndex()].captionNo3.value" readonly>
													</div><!-- /input-group -->
												</div>
											</div>
										</div>
										<div class="col-sm-6">

										</div>
									</div>
								</form>
								</uib-tab> 
								<uib-tab heading="地址信息"> <br>

								<form class="form-horizontal"
									id="customer_customerInfo_single_form_address">
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">地标</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sAddressName.value"
														data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
									</div>
									
									<div class="row">

										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">办公地址</label>
												<div class="col-sm-10">
													<div class="input-group">
														<input type="text" class="form-control"
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sAddress.value"
															data-ng-readonly="true" /> <span
															class="input-group-btn">
															<button class="btn btn-default btn-sm"
																data-ng-disabled="Model.dataMaster.readonly();"
																data-ng-click="Model.triggerRegionCodeClick()">
																<span class="glyphicon "
																	data-ng-class="{'glyphicon-th-list':(Model.dataMaster.rows[Model.dataMaster.currentIndex].sAddress.value==null || Model.dataMaster.rows[Model.dataMaster.currentIndex].sAddress.value==''),'glyphicon-remove':!(Model.dataMaster.rows[Model.dataMaster.currentIndex].sAddress.value==null || Model.dataMaster.rows[Model.dataMaster.currentIndex].orgFID.value=='')}"
																	aria-hidden="true"></span>
															</button>
														</span>
													</div>
												</div>
											</div>

										</div>
										<div class="col-sm-6">
											<div class="form-group form-group-sm">
												<label class="col-sm-2 control-label">详细地址</label>
												<div class="col-sm-10">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sAddressDetail.value"
														name="sAddressDetail" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>

										</div>
									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">邮编</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sZip.value"
														name="sZip" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">办公电话</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sPhone.value"
														name="sPhone" data-ng-disabled="Model.dataMaster.readonly();"/>
												</div>
											</div>
										</div>
										<div class="col-sm-3">

											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">传真</label>
												<div class="col-sm-8">
												
														<input type="text" class="form-control" 
															data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].sFax.value"
															name="sFax"	data-ng-disabled="Model.dataMaster.readonly();" />
												</div>
											</div>

										</div>
									</div>
										</form>
								</uib-tab> 
								<uib-tab heading="备注"> <br>

								<form class="form-horizontal"
									id="customer_customerInfo_single_form_comments">

									<div class="row">
										<div class="col-sm-12">

											<div class="form-group">
												<label class="col-sm-1 control-label">备注</label>
												<div class="col-sm-11">
													<textarea rows="5" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].comments.value"
														data-ng-readonly="Model.dataMaster.readonly();">
													</textarea>
												</div>
											</div>

										</div>
									</div>
								</form>
								</uib-tab> <uib-tab heading="制单"> <br>

								<form class="form-horizontal"
									id="customer_customerInfo_single_form_user">

									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">制单人</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].cUsercode.value"
														disabled />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">名称</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].cUsername.value"
														disabled />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">制单时间</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].cDatetime.value"
														disabled />
												</div>
											</div>
										</div>

									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">修改人</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].eUsercode.value"
														disabled />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">名称</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].eUsername.value"
														disabled />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">修改时间</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].eDatetime.value"
														disabled />
												</div>
											</div>
										</div>

									</div>
									<div class="row">
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">审批人</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].tUsercode.value"
														disabled />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">名称</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].tUsername.value"
														disabled />
												</div>
											</div>
										</div>
										<div class="col-sm-3">
											<div class="form-group form-group-sm">
												<label class="col-sm-4 control-label">审批时间</label>
												<div class="col-sm-8">
													<input type="text" class="form-control"
														data-ng-model="Model.dataMaster.rows[Model.dataMaster.currentIndex].tDatetime.value"
														disabled />
												</div>
											</div>
										</div>

									</div>
								</form>
								</uib-tab> </uib-tabset>


							</div>
						</div>
						<!-- 子表按钮菜单 -->
						<div class="row">
							<div class="col-sm-12">

								<nav class="nav">
									<ul class="pagination navbar-left buttonBar">
										<li>
											<div class="btn-group" role="toolbar">
												<button type="button" class="btn btn-default "
													data-ng-disabled="Model.dataMaster.readonly()"
													data-ng-click="Model.addrow()">
													<span class="glyphicon glyphicon-plus"></span> 增加
												</button>
												<button type="button" class="btn btn-default"
													data-ng-disabled="Model.dataMaster.readonly() || Model.dataDetail.currentIndex==null"
													data-ng-click="Model.delrow()">
													<span class="glyphicon glyphicon-minus"></span> 删除
												</button>

											</div>
										</li>
									</ul>


								</nav>

							</div>
						</div>

						<!-- 子表 -->
						<div class="row">
							<div class="col-sm-12">

							<div class="table-responsive">
								<table class="table table-hover table-condensed"
									data-readonly={{Model.dataMaster.readonly()}}
									style="cellpadding: 0px; cellspacing: 0px;">
									<thead>
								<tr>
									<th colspan="99"  style="padding:0px;">
									</th>
								</tr>

										<tr>
											<th></th>

											<th>#</th>
											<th hidden="hidden">状态</th>
											<th hidden="hidden">fID</th>

											<th hidden="hidden">操作状态</th>
											<th hidden="hidden">子系统</th>
											<th hidden="hidden">单据类型</th>
											<th hidden="hidden">单据类型</th>
											<th hidden="hidden">日期</th>
											<th hidden="hidden">audit</th>
											<th hidden="hidden">fMasterID</th>

											<th>地标</th>
											<th>收货地址</th>
											<th>详细地址</th>
											<th>联系人</th>
											<th>移动电话</th>
											<th>电话</th>
											<th>传真</th>
											<th>电子邮件</th>
											<th >QQ号码</th>
											<th hidden="hidden">storageName</th>
											<th>默认</th>
											<th>备注</th>
											<th hidden="hidden">创建者编码</th>
											<th hidden="hidden">创建者</th>
											<th hidden="hidden">创建时间</th>
											<th hidden="hidden">创建者id</th>
											<th hidden="hidden">公司id</th>
											<th hidden="hidden">公司</th>
											<th></th>
										</tr>
									</thead>
									<tbody>
										<tr data-ng-show="row.userdata.recordState!='delete'"
											data-ng-class="{true:'active'}[Model.dataDetail.currentIndex==Model.dataDetail.rows.indexOf(row)]"
											data-ng-click="Model.dataDetail.onRowClick(row,$event)"
											data-ng-repeat="row in Model.dataDetail.rows">
											<td style="width: 10px;"><span
												data-ng-show="Model.dataDetail.currentIndex==Model.dataDetail.rows.indexOf(row)"
												class="glyphicon glyphicon-hand-right" aria-hidden="true"></span></td>

											<td style="width: 20px;">{{Model.dataDetail.rows.indexOf(row)+1}}</td>
											<td style="width: 50px;" hidden="hidden"
												data-ng-bind="row.userdata.recordState"></td>
											<td style="width: 200px;" hidden="hidden">{{row.fID.value}}<span
												data-ng-bind="row.enterpriseNo.value"></span></td>

											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.state.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.systemCode.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.billType.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.billTypeName.value"></span></td>
											<td style="width: 500px;" hidden="hidden" td-input="date"
												data-orientation="bottom auto"
												data-ng-model="row.orderDate.value"><span
												data-ng-bind="row.orderDate.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.audit.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.fMasterID.value"></span></td>

											<td style="width: 100px;" td-input="text"
												data-ng-model="row.fAddressName.value"><span
												data-ng-bind="row.fAddressName.value"></span></td>
											<td style="width: 300px;" td-input="outputbtn"
												iptclick="Model.grid_fAddressButtonClick()"
												data-ng-model="row.fAddress.value"><span
												data-ng-bind="row.fAddress.value"></span></td>
											<td style="width: 300px;" td-input="text"
												data-ng-model="row.fAddressDetail.value"><span
												data-ng-bind="row.fAddressDetail.value"></span></td>
											<td style="width: 100px;" td-input="text"
												data-ng-model="row.contacts.value"><span
												data-ng-bind="row.contacts.value"></span></td>
											<td style="width: 100px;" td-input="text"
												data-ng-model="row.mobilePhone.value"><span
												data-ng-bind="row.mobilePhone.value"></span></td>
											<td style="width: 100px;" td-input="text"
												data-ng-model="row.fPhone.value"><span
												data-ng-bind="row.fPhone.value"></span></td>
											<td style="width: 100px;" td-input="text"
												data-ng-model="row.faxPhone.value"><span
												data-ng-bind="row.faxPhone.value"></span></td>
											<td style="width: 100px;" td-input="text"
												data-ng-model="row.email.value"><span
												data-ng-bind="row.email.value"></span></td>
											<td style="width: 100px;" td-input="text"
												data-ng-model="row.qqCode.value"><span
												data-ng-bind="row.qqCode.value"></span>
											</td>
											<td style="width: 200px;" hidden="hidden"
												data-ng-model="row.storageName.value"><span
												data-ng-bind="row.storageName.value"></span>
											</td>
											<td style="width: 50px;" 
												data-ng-model="row.iDefault.value">
												<input type="checkbox"
										data-ng-model="row.iDefault.value"
										data-ng-true-value="1" data-ng-false-value="0" 
										ng-disabled="Model.dataMaster.readonly();">
												
											</td>
											<td style="width: 200px;" td-input="text"
												data-ng-model="row.comments.value"><span
												data-ng-bind="row.comments.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.cUsercode.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.cUsername.value"></span></td>
											<td style="width: 200px;" hidden="hidden"><span
												data-ng-bind="row.cDatetime.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.userId.value"></span></td>
											<td style="width: 100px;" hidden="hidden"><span
												data-ng-bind="row.enterpriseNo.value"></span></td>
											<td style="width: 200px;" hidden="hidden"><span
												data-ng-bind="row.enterpriseName.value"></span></td>

											<td></td>
										</tr>

									</tbody>
									<tfoot>
								<tr>
									<th colspan="99">
									</th>
								</tr>
									
									</tfoot>

								</table>
							</div>


							</div>
						</div>




					</div>

				</div>






			</div>
		</div>
	</div>


</body>

</html>

